﻿using System;

namespace SharpSqlAnalyzer.nodes
{
	// Token: 0x02000342 RID: 834
	public class TResultColumnList : TParseTreeNodeList
	{
		// Token: 0x0600222E RID: 8750 RVA: 0x00334EAA File Offset: 0x003330AA
		public virtual void removeResultColumn(int index)
		{
			if (index >= 0 && index < base.size())
			{
				this.getResultColumn(index).setChanged();
				base.removeElementAt(index);
			}
		}

		// Token: 0x0600222F RID: 8751 RVA: 0x00334ECC File Offset: 0x003330CC
		[Obsolete("addResultColumn(string ptext) is deprecated, please create an instace of TResultColumn and use addResultColumn(TResultColumn resultColumn) instead.")]
		public virtual void addResultColumn(string ptext)
		{
		}

		// Token: 0x06002230 RID: 8752 RVA: 0x00334ECE File Offset: 0x003330CE
		public virtual void addResultColumn(TResultColumn resultColumn)
		{
			base.addElement(resultColumn);
			base.setChanged();
		}

		// Token: 0x06002231 RID: 8753 RVA: 0x00334EDD File Offset: 0x003330DD
		public virtual TResultColumn getResultColumn(int position)
		{
			if (position < base.size())
			{
				return (TResultColumn)this.elementAt(position);
			}
			return null;
		}

		// Token: 0x06002232 RID: 8754 RVA: 0x00334EF6 File Offset: 0x003330F6
		internal override void addParseTreeNode(object arg1)
		{
			this.addResultColumn((TResultColumn)arg1);
		}

		// Token: 0x06002233 RID: 8755 RVA: 0x00334F04 File Offset: 0x00333104
		public override TSourceToken getStartToken()
		{
			TSourceToken tsourceToken = null;
			for (int i = 0; i < base.size(); i++)
			{
				tsourceToken = this.getResultColumn(i).startToken;
				if (tsourceToken != null)
				{
					break;
				}
			}
			return tsourceToken;
		}

		// Token: 0x06002234 RID: 8756 RVA: 0x00334F38 File Offset: 0x00333138
		public override TSourceToken getEndToken()
		{
			TSourceToken tsourceToken = null;
			for (int i = base.size() - 1; i >= 0; i--)
			{
				tsourceToken = this.getResultColumn(i).endToken;
				if (tsourceToken != null)
				{
					break;
				}
			}
			return tsourceToken;
		}

		// Token: 0x06002235 RID: 8757 RVA: 0x00334F6B File Offset: 0x0033316B
		public override void accept(TParseTreeVisitor v)
		{
			v.preVisit(this);
			v.postVisit(this);
		}

		// Token: 0x06002236 RID: 8758 RVA: 0x00334F7C File Offset: 0x0033317C
		public override void acceptChildren(TParseTreeVisitor v)
		{
			v.preVisit(this);
			for (int i = 0; i < base.size(); i++)
			{
				this.getResultColumn(i).acceptChildren(v);
			}
			v.postVisit(this);
		}
	}
}
